package com.yntx.usercenter.authorization.converter;

import com.yntx.usercenter.authorization.dto.RoleDTO;
import com.yntx.usercenter.authorization.dto.RoleUpdateDTO;
import com.yntx.usercenter.authorization.po.Role;
import com.yntx.usercenter.authorization.vo.RoleVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 角色转换
 *
 * @author jielihaofeng
 * @date 2023/05/08
 */
@Mapper
public interface RoleConverter {

    RoleConverter INSTANCE = Mappers.getMapper(RoleConverter.class);

    List<RoleVO> role2RoleVOList(List<Role> roleList);

    Role roleAddDTO2Role(RoleDTO dto);

    Role roleUpdateDTO2Role(RoleUpdateDTO dto);

}
